package com.xtc.nacos.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("config")
public class NacosConfigController {

    @NacosValue("${info:spring-boot-nacos-config}")
    private String info;

    /**
     * 获取配置
     * @return
     */
    @GetMapping("/info")
    public String getInfo() {
        return info;
    }
}
